import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/waiters/list',
    method: 'get',
    params: { query }
  })
}

export function fetchArticle(id) {
  return request({
    url: '/vue-element-admin/article/detail',
    method: 'get',
    params: { id }
  })
}

export function createWaiters(data) {
  return request({
    url: '/waiters/create',
    method: 'post',
    data
  })
}

export function updateWaiters(data) {
  return request({
    url: '/waiters/update',
    method: 'post',
    data
  })
}
export function deleteWaiters(id) {
  return request({
    url: '/waiters/delete',
    method: 'post',
    params: { id }
  })
}
export function fetchOptions() {
  return request({
    url: '/waiters/options',
    method: 'post'
  })
}
